package com.wei.czz.framework.admin.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wei.czz.common.dto.admin.UserAppealDto;
import com.wei.czz.framework.admin.entity.UserAppealEntity;
import org.apache.ibatis.annotations.Param;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wei
 * date: 2022-04-15 21:40:54
 * className: UserAppealDao 用户申诉记录数据库交互接口
 * version: 1.0
 * description:
 */
public interface UserAppealDao extends BaseMapper<UserAppealEntity> {

    /**
     * 分页查询申诉记录列表
     * @param page       mp分页对象
     * @param riskFlowId 风控主键
     * @return 查询结果
     */
    Page<UserAppealDto> getUserAppealList(Page<UserAppealDto> page, @Param("riskFlowId") Long riskFlowId);

    /**
     * 查询用户最近一次申诉的申诉内容
     * @param riskFlowId 用户风控记录主键
     * @return 用户申诉内容
     */
    UserAppealDto getUserAppealDesc(@Param("riskFlowId") Long riskFlowId);

}
